import request from '@/utils/request'

/**
 * 获取一级分类列表
 * @returns getCategory1List
 */
export function getCategory1ListApi() {
  return request({
    url: `/admin/product/getCategory1`,
    method: 'get'
  })
}

/**
 * 获取二级分类列表
 * @param {一级分类Id} category1Id 
 * @returns getCategory2List
 */
export function getCategory2ListApi(category1Id) {
  return request({
    url: `/admin/product/getCategory2/${category1Id}`,
    method: 'get'
  })
}

/**
 * 获取三级分类列表
 * @param {二级分类Id} category2Id 
 * @returns getCategory3List
 */
export function getCategory3ListApi(category2Id) {
  return request({
    url: `/admin/product/getCategory3/${category2Id}`,
    method: 'get'
  })
}

